package com.wanglemei.mail.util;
 
import javax.mail.Authenticator;   
import javax.mail.PasswordAuthentication;   
 
public class EmailAuthenticator extends Authenticator {   
    private String m_username = null;   
   
    private String m_userpass = null;   
   
    void setUsername(String username) {   
        m_username = username;   
    }   
    String getUsername()
    {
    	return this.m_username;
    }
   
    void setUserpass(String userpass) {   
        m_userpass = userpass;   
    }   
   String getUserpass()
   {
	   return this.m_userpass;
   }
    
    public EmailAuthenticator(String username, String userpass) {   
        super();   
        setUsername(username);   
        setUserpass(userpass);   
        
    }   
   
    public PasswordAuthentication getPasswordAuthentication() {   
        return new PasswordAuthentication(m_username, m_userpass);   
    }   
}